<template>
    <div class="add_page">
        <div class="container">
            <div class="page_title">添加用户</div>
            <div class="cell">
                <div class="title">用户姓名: </div>
                <div class="input_div"><input name="name" @input="inputValueChange($event)" type="text"></div>
            </div>
            <div class="cell">
                <div class="title">微信号: </div>
                <div class="input_div"><input name="wechat_id" @input="inputValueChange($event)" type="text"></div>
            </div>
            <div class="cell">
                <div class="title">联系方式: </div>
                <div class="input_div"><input name="mobile" @input="inputValueChange($event)" type="text"></div>
            </div>
            <div class="cell">
                <div class="title">身份证号: </div>
                <div class="input_div"><input name="identity_card" @input="inputValueChange($event)" type="text"></div>
            </div>
            <div class="cell">
                <div class="title">推荐人手机号: </div>
                <div class="input_div"><input name="user_id" @input="inputValueChange($event)" type="text"></div>
            </div>
            <div class="commit">
                提交
            </div>
        </div>
    </div>
</template>

<script>
export default {
  data() {
    return {
        params: {
            name: '',
            wechat_id: '',
            mobile: '',
            identity_card: '',
            user_id: ''
        }
    };
  },
  mounted() {},
  methods: {
      inputValueChange(e) {
          let value = e.target.value;
          let type = e.target.name;
          this.params[type] = value;
          console.log('value', name, value, this.params);
      }
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.add_page {
  position: absolute;
  height: 100%;
  width: 100%;
  background: url("../../assets/img1.jpg") no-repeat;
  background-size: 100%;
  .container {
    width: 1200px;
    margin: 0 auto;
    height: 100%;
    background: #f7f7f7;
    overflow: hidden;
    .cell{
        margin-left: 30px;
        margin-top: 30px;
        display: flex;
        .title{
            width: 100px;
        }
        .input_div{
            margin-left: 10px;
        }
    }
    .commit{
        margin-left: 30px;
        margin-top: 30px;
        width: 100px;
        cursor: pointer;
        text-align: center;
        color: #fff;
        border-radius: 10px;
        background: #5ebfb8;
        padding: 5px 10px;
    }
  }
  .page_title{
      font-size: 24px;
      margin-left: 30px;
      margin-top: 30px;
      border-bottom: 1px #e1e1e1 solid;
  }
}
</style>
